#ifndef __UA_H__
#define __UA_H__

#define UA_MAX_LUN 0x3FFF

#define UA_ASC_ALL 0
#define UA_ASCQ_DEF 0

#define UA_ALL 1
#define UA_FIRST 2

#define UA_INITIATOR_INCLUDE 0
#define UA_INITIATOR_EXCLUDE 1
#define UA_INITIATOR_ALL 2
#define UA_INITIATOR_RULE_VALID(rule) ((rule) == UA_INITIATOR_INCLUDE || \
	(rule) == UA_INITIATOR_EXCLUDE || \
	(rule) == UA_INITIATOR_ALL)

#define UA_MAX_SENSE_LEN 14

typedef  struct  ua_entry{
	struct list_head	ua_list;
	u32 lun;
	u8	asc;
	u8	ascq;
} ua_entry_t;



int ua_generate (
	struct iscsi_session *session,
	u8 asc,
	u8 ascq,
	u32  lun,
	int rule
);

int ua_deliver_clear (
	struct iscsi_cmnd 	*cmd
);

int ua_clear (
	struct iscsi_session *session,
	u32 lun,
	u8 asc,
	int all
);

int ua_pending(
	struct iscsi_session * session,
	u32 lun,
	u8 asc

);




#endif
